package com.eastjet.maintenance.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.eastjet.maintenance.domain.Application;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author 杨博文
 * @description 针对表【application(采购申请表)】的数据库操作Service
 * @createDate 2024-11-25 09:23:37
 */
public interface ApplicationService extends IService<Application> {

    /**
     * 新增采购申请
     *
     * @param application
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    Boolean InsertApplication(Map<String, Object> map);

    /**
     * 新增备件采购申请
     *
     * @param application
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    Boolean InsertApplicationBei(Map<String, Object> map);

    /**
     * 更新采购申请
     *
     * @param application
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    Boolean UpdateApplication(Application application);

    /**
     * 删除采购申请
     *
     * @param code
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    Boolean DeleteApplication(Application code);

    /*
     * 查询所有采购申请
     */
    List<Application> selectAllApplication(Application application);

    /*
     * 查询已经审核人员的采购申请
     */
    List<Application> selectAllApplicationQi(String status);

    /**
     * 更新采购申请的审核状态
     *
     * @param code
     * @param status
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    Boolean UpdteApplicationQi(String code, String status);
}
